<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.7/iconfont.css" rel="stylesheet" type="text/css" />

<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>权限管理</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> <a href="index.html" target="_parent">首页</a> <span class="c-gray en">&gt;</span> <a href="shop-list.html">管理员管理</a> <span class="c-gray en">&gt;</span> 权限管理 <a class="btn btn-success radius r mr-20 reload" style="line-height:1.6em;margin-top:3px" href="javascript:;" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="pd-10">
	

	<div class="mt-20">
		<table class="table table-border table-bordered table-bg table-hover table-sort" id="categorylist">
			<thead>
				<tr class="text-c sort0">
					<th width="40" class="valueid"><input name="" type="checkbox" value=""></th>
					<th width="40" class="fun-sort2" data-name="id" data-flag="0">ID</th>
					<th width="120">权限名称</th>
					<th width="100">权限规则</th>
					<th>所在权限组</th>
					<th>附加条件</th>
					<th width="40" class="fun-sort2" data-name="sort" data-flag="0">排序</th>
					<th width="60">显示状态</th>
					<th width="120">操作</th>
				</tr>
			</thead>
			<tbody id="content_sp">
				
			</tbody>
		</table>
	</div>

	<div class="cl pd-5 bg-1 bk-gray mt-10"> 
		
		<a href="javascript:;" class="btn btn-warning l mr-10 mt-5 radius fun-all" data-type="stop"><i class="Hui-iconfont">&#xe6de;</i> 批量关闭</a> 
		<a href="javascript:;" class="btn btn-success l mr-10 mt-5 radius fun-all" data-type="start"><i class="Hui-iconfont">&#xe603;</i> 批量开启</a> 
		<a href="javascript:;" class="btn btn-danger l mr-10 mt-5 radius fun-all" data-type="del"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a> 
		<a class="btn btn-primary radius mt-5 l" data-title="添加顶级" onclick="_open('添加顶级权限','admin-permission-add.html','40%','60%',false)" href="javascript:;">
		<i class="Hui-iconfont">&#xe600;</i> 添加顶级权限
		</a>
		<span class="r pt-5"  style="line-height: 35px;" id="page"></span>
		<span class="r mr-10"  style="line-height: 40px;" id="dataall"></span>   
	</div>

</div>
<!-- 模版 -->
<script id="test" type="text/html">
<% for (x in list) { %>
	<tr class="text-c va-m sort1" bgcolor="#fff">
		<td class="valueid"><input name="" type="checkbox" value="<%=list[x].id%>"></td>
		<td class="text-l"><%=list[x].id%></td>
		<td class="text-l">
		<% if(list[x].child){ %>
			<a style="text-decoration:none;" class="fun-openclose" data-flag="0" href="javascript:;" data-sortnum="1">
				<b><span class="f-16" style="width:20px; display: inline-block;">+</span><%=list[x].title%>(<%=list[x].child.length;%>)</b> 
			</a>
		<% }else{ %>
			<b><%=list[x].title%></b>
		<% } %>
		</td>
		<td class="text-l "><%=list[x].name%></td>
		<td class="text-l "><%=list[x].contain%></td>
		<td class="text-l "><%=list[x].condition%></td>
		<td class="text-c "><input type="text" size="3" class="fun-paixu" name="paixu" value="<%=list[x].sort%>" style="text-align: center;"></input></td>
		<td class="td-status">
			<div class="bs-docs-example btn-isshow">
				<input type="checkbox" class="switch fun-start-stop" <%if(list[x].status==1){ %>checked<% } %>/>
			</div>
		</td>
		<td class="td-manage f-18">
			<a style="text-decoration:none" onClick="_open('添加<b class=c-primary><%=list[x].title%></b>子权限','admin-permission-add.html?parentid=<%=list[x].id%>','60%','60%',false)" href="javascript:;" title="添加子权限"><i class="Hui-iconfont">&#xe600;</i></a> 
			<a style="text-decoration:none" onClick="_open('权限编辑','admin-permission-add.html?editid=<%=list[x].id%>','60%','60%',false)" class="ml-5 edit" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> 
			<a style="text-decoration:none" class="ml-5 fun-del" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i>

		</td>
	</tr>

	<% for (j in list[x].child) { %>
		<tr class="text-c va-m sort2" bgcolor="#dff0d8" style="display: none;">
				<td class="valueid"><input name="" type="checkbox" value="<%=list[x].child[j].id%>"></td>
				<td class=""><%=list[x].child[j].id%></td>
				<td class="text-l " style="padding-left: 30px;">
				<% if(list[x].child[j].child){ %>
					<a style="text-decoration:none; padding-left: 15px;" data-flag="0" data-sortnum="2" href="javascript:;">
					+<%=list[x].child[j].title%>(<%=list[x].child[j].child.length;%>) 
					</a>
				<% }else{ %>
					<%=list[x].child[j].title%>
				<% } %>
				</td>
				<td class="text-l "><%=list[x].child[j].name%></td>
				<td class="text-l "><%=list[x].child[j].contain%></td>
				<td class="text-l "><%=list[x].child[j].condition%></td>
				<td class="text-c "><input type="text" size="3" class="fun-paixu" name="paixu" value="<%=list[x].child[j].sort%>" style="text-align: center;"></input></td>
				<td class="td-status">
					<div class="bs-docs-example btn-isshow">
						<input type="checkbox" class="switch " <%if(list[x].child[j].status==1){ %>checked<% } %>/>
					</div>
				</td>
				<td class="td-manage f-18">
				<a style="text-decoration:none" onClick="_open('添加<b class=c-primary><%=list[x].child[j].title%></b>子权限','admin-permission-add.html?parentid=<%=list[x].child[j].id%>','60%','60%',false)" href="javascript:;" title="添加子权限"><i class="Hui-iconfont">&#xe600;</i></a> 
				<a style="text-decoration:none" onClick="_open('权限编辑','admin-permission-add.html?editid=<%=list[x].child[j].id%>','60%','60%',false)" class="ml-5 edit" href="javascript:;" title="编辑"><i class="Hui-iconfont">&#xe6df;</i></a> 

				<a style="text-decoration:none" class="ml-5 fun-del" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i>
				</td>
			</tr>
	
	
	<%}%>
<%}%>
</script>
<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript" src="js/H-ui.js"></script>
<script type="text/javascript" src="lib/layer/2.1/layer.js"></script>

<script type="text/javascript" src="lib/Validform/5.3.2/Validform.min.js"></script>
<script type="text/javascript" src="js/H-ui.admin.js"></script> 
<script type="text/javascript" src="js/template-native.js"></script> 
<script type="text/javascript" src="js/s.js"></script> 
<script type="text/javascript" src="lib/laypage/laypage.js"></script> 
<script src="/Manage/js/lazyload.min.js"></script>


<script type="text/javascript">
var API=API_AUTH;
var kk=API_AUTH;
var orderby='';
var search='';

loaddata(API,1,false);




</script>

</body>
</html>